package com.hex.ds.hdrs.common.enums;

public enum CronTaskStatusEnum {

    SUCCESS("1", "执行成功"),
    FAIL("2", "执行失败"),
    EXECING("3", "执行中");

    private String value;
    private String name;

    private CronTaskStatusEnum(String name, String value) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static CronTaskStatusEnum fromCronTaskStatusEnum(String name) {
        for (CronTaskStatusEnum type : CronTaskStatusEnum.values()) {
            if (type.getName().equals(name)) {
                return type;
            }
        }
        return null;
    }
}
